package com.camel.base.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.camel.base.enums.NumberNature;
import com.camel.core.annotations.AssociationField;
import com.camel.core.config.RequestEnumJsonDeserialize;
import com.camel.core.entity.BasePaginationEntity;
import java.io.Serializable;
import java.util.Date;

import com.camel.core.enumhandler.MyIntegerToEnumHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import lombok.Data;

/**
 *
 * @TableName zs_pstnnumber
 * @author camel
 */
@TableName(value ="zs_pstnnumber")
@Data
public class ZsPstnnumber extends BasePaginationEntity implements Serializable {
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 外呼号码
     */
    @TableField(value = "pstnnumber")
    private String pstnnumber;

    /**
     * 所属最终用户
     */
    @TableField(value = "belong_user")
    private Integer belongUser;

    /**
     * 暂时所属公司（最终客户会主动分配）
     */
    @TableField(value = "company_id")
    private Integer companyId;

    @TableField(value = "company_name")
    private String companyName;

    /**
     * 企业编号
     */
    @TableField(value = "company_no")
    private Integer companyNo;

    /**
     * 备注
     */
    @TableField("remark")
    private String remark;

    /**
     * 码号性质
     */
    @TableField(value = "nature", typeHandler = MyIntegerToEnumHandler.class)
    @JsonDeserialize(using = RequestEnumJsonDeserialize.class)
    private NumberNature nature;

    /**
     * 数据来源
     *
     */
        private Integer source;

    /**
     * 落地主叫改写规则
     */
    @TableField("rewrite_rules_in_callee")
    private String rewriteRulesInCallee;

    /**
     * 供应商提供的信令端口
     */
    @TableField("signal_port")
    private Integer signalPort;

    /**
     * 供应商提供的远端IP
     */
    @TableField("remote_ip")
    private String remoteIp;


    /**
     * 有效时间
     * 空为长期有效
     */
    @TableField("valid_date")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date validDate;

    @TableField("gateway")
    private String gateway;


    /**
     * 并发数
     */
    @TableField("line")
    private Integer line;

    /**
     * 热线区号
     */
    @TableField("area_code")
    private String areaCode;


    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}
